home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_10.lha
/
7_10
/
test2.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-08
|
436b
|
26 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
* based on cfront 2.0 release notes Spaces example */
include <process.h>
lass Spaces : public process
char *s;
ublic:
Spaces(char *ns);
long main();
;
paces::Spaces(char *ns) : ("spaces") { s = ns; }
ong Spaces::main()
int i = 0;
while (*s)
if (*s++ == ' ')
i++;
return i;